Skip to content

Conversation

@ksen0
Copy link
Member

@ksen0 ksen0 commented Oct 22, 2025

(Reopening #841, which was incorrectly / accidentally closed)

Addresses #415 - work in progress. Remains to be done:

  • Support for cases where pre-2023 attribution is also collective e.g., Shape primitives
  • Support for cases where there is no link for author
  • Once done on main, will need to be cherrypicked to 2.0 as well
  • Ensure all people mentioned in any part of attribution is on all-contributors in p5.js README in both main and dev-2.0 branches and include "example" emoji. Complete list: Prof** WM Harris, GH/prashantgupta24 Alternatively, can reach out to these contributors and ask them if they want to be included in the list. Since the attribution would be clear on each example.

Current Behavior

The license is at the bottom of the page, and attribution (inspired by and maintained by) is split.

Screenshot 2025-05-13 at 12 21 45

(Then there is the sketch and the code - viewer has to scroll all the way down)

Screenshot 2025-05-13 at 12 21 51

PR Behavior

Although attribution of p5.js contributors work is collective, this schema allows detailed attribution of referenced work from outside the community in a detailed attribution history. For example, including the following in the .mdx of an example:

remix:
  - description: Created by
    attribution:
      - name: Caleb Foss
        URL: https://github.com/calebfoss
      - name: Darren Kessner
        URL: https://github.com/dkessner
    code:
      - label: 2023 code
        URL: https://github.com/processing/p5.js-example/tree/main/examples/01_Shapes_And_Color/01_Color
  - collectivelyAttributedSince: 2024

Will create the following attribution:

image

Thus, new examples can be added that correctly attribute referenced material. In the above schema, the collectivelyAttributedSince field is applicable mainly to examples ported from the Processing or archived p5.js site. For future additions, the remix filed can be used to provide a complete history. The URLs for attribution and type of remix can be edited, with optional URLs. If there is no remixLabel, "Remixed from" will be used, but other phrasing can be provided for clarity.

@ksen0 ksen0 mentioned this pull request Oct 22, 2025
4 tasks
@ksen0 ksen0 requested a review from davepagurek October 28, 2025 21:49
Revised by: Revised by
Based on: Based on
Created by: Created by
and: and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the format you've arrived at here is a good compromise between having to juggle a lot more content in translations and awkwardness in structure.

The one thing that might be an issue, which I'm not really sure is an issue or not, is whether translations for small chunks can be strung together with the same structure across languages, or if the grammar of those languages would need e.g. a reordering of the translation strings. It seems like most of these should be ok, but I guess the code to full sentences we do here, the more flexibility translations will have. This could be a non issue for this current set of strings though, I just don't know enough of the languages we support to say for sure so I thought I'd mention it just in case!

Copy link
Member Author

@ksen0 ksen0 Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for taking the time to review this. So after looking into this - the full solution would involve something like a i18n string "Edited and maintained by {p5.js} and {pf_org}" which is then filled in with the link, so more grammars can be supported, without this and: and workaround. I will make this a separate open issue for someone else to tackle. In this PR I have updated the i18n strings to se a clearer hierarchy for those strings relevant to the attribution message, so there's no side effects:

attribution:
  Remixed by: Remixed by
  Revised in 2023 by: Revised in 2023 by
  Revised by: Revised by
  Based on: Based on
  Created by: Created by
  and: and
  Edited and maintained by: Edited and maintained by
  From 2024 onwards, edited and maintained by: From 2024 onwards, edited and maintained by
  You can find the code history of these examples here: You can find the code history of these examples here
  You can suggest improvements by: You can suggest improvements by
  contributing to the current website: contributing to the current website

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That approach makes sense, thanks for looking into it!

const collectivelyAttributedSince = example.data.remix?.reduce(
(acc: number | null, item) => {
if (item.collectivelyAttributedSince) {
return item.collectivelyAttributedSince;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this means we need these entries in chronological order? might be worth stating that explicitly in the docs in case someone accidentally does them in reverse chronological.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, will update!

@ksen0 ksen0 merged commit d845925 into processing:main Oct 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants